<?php 
	if(strpos($classes, "first") !== false ) $blocknum = " rt-alpha";
	elseif(strpos($classes, "last") !== false) $blocknum = " rt-omega";
	else $blocknum = "";
	
	if($block_count == 1) {$thisGridCount = 12;}
	elseif($block_count == 6) {$thisGridCount = 2;}
	else {
		$thisVar = "maintopgrid_" . $block_count;
		$thislayout = theme_get_setting($thisVar);
		$gridCount = explode("|", $thislayout);
		$thisCount = $block_id - 1;
		$thisGridCount = $gridCount[$thisCount];
	}
	//$block_id;
?>

<div class="rt-grid-<?=$thisGridCount;?><?=$blocknum;?>">
	<?php if (module_exists('block_class')) : ?>
	<div class="<?php print block_class($block); ?>">
	<?php endif; ?>
	
	<?php if (module_exists('block_class')) : ?>
	<div class="<?php print block_class($block); ?>">
	<?php endif; ?>
	
		<div class="rt-block">
			<div class="module-surround">
				<div class="module-icon"></div>
				<?php if ($block->subject) : ?>
					
						<div class="module-title">
							<h2 class="title"><?php print $block->subject; ?></h2>
						</div>
					
				<?php endif; ?>
				
				
					
				<div class="module-content">
					<?php print $content; ?>
					<div class="clear"></div>
				</div>
				
			</div>
					
		</div>
	
	
	
	<?php if (module_exists('block_class')) : ?>
	</div>
	<?php endif; ?>								
			
	
	
	<?php if (module_exists('block_class')) : ?>
	</div>
	<?php endif; ?>
	
</div>

